import request from '@/utils/request';

// 查询评论详细
export function queryById(id) {
  return request({
    url: '/cms/comment/queryById/' + id,
    method: 'get',
  });
}

// 分页查询评论列表
export function pageList(query) {
  return request({
    url: '/cms/comment/pageList',
    method: 'get',
    params: query,
  });
}

// 分页查询逻辑删除的评论列表
export function pageRecycle(params) {
  return request({
    url: '/cms/comment/pageRecycle',
    method: 'get',
    params,
  });
}

// 分页查询已发布的评论列表
export function pageRelease(params) {
  return request({
    url: '/cms/comment/pageRelease',
    method: 'get',
    params,
  });
}

// 查询评论列表
export function queryList(query) {
  return request({
    url: '/cms/comment/queryList',
    method: 'get',
    params: query,
  });
}

// 分页查询逻辑删除的评论列表
export function queryRecycle(params) {
  return request({
    url: '/cms/comment/queryRecycle',
    method: 'get',
    params,
  });
}

// 查询已发布的评论列表
export function queryRelease(params) {
  return request({
    url: '/cms/comment/queryRelease',
    method: 'get',
    params,
  });
}

// 新增评论
export function insert(data) {
  return request({
    url: '/cms/comment/insert',
    method: 'post',
    data: data,
  });
}

// 修改评论
export function updateById(data) {
  return request({
    url: '/cms/comment/updateById',
    method: 'put',
    data: data,
  });
}

// 根据id批量审核
export function auditByIds(ids) {
  return request({
    url: '/cms/comment/auditByIds/' + ids,
    method: 'put',
  });
}

// 根据id批量反审核
export function unauditByIds(ids) {
  return request({
    url: '/cms/comment/unauditByIds/' + ids,
    method: 'put',
  });
}
// 导出当前查询列表
export function exports(params) {
  return request({
    url: '/cms/comment/export',
    method: 'post',
    params,
  });
}

// 删除评论
export function deleteByIds(ids) {
  return request({
    url: '/cms/comment/deleteByIds/' + ids,
    method: 'delete',
  });
}

// 根据id批量还原删除的评论
export function recoverByIds(ids) {
  return request({
    url: '/cms/comment/recoverByIds/' + ids,
    method: 'put',
  });
}
// 根据id批量逻辑删除评论
export function removeByIds(ids) {
  return request({
    url: '/cms/comment/removeByIds/' + ids,
    method: 'delete',
  });
}
